package com.lijie.es.pojo;/**
 * @description
 * @author HC
 * @date 2022-01-26-18:08
 */

import lombok.Data;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * @author 钟冰涛
 * @description
 * @date 2022/1/26 18:08
 */
@Data
@ToString
@Document(indexName = "hello_world",shards = 2, replicas = 1)
public class Item implements Serializable {
   @Id
    private String id;
   private String userName;
   @Field(type = FieldType.Keyword)
   private String password;
   @Field(type = FieldType.Integer)
   private Integer age;
   @Field(type = FieldType.Text,analyzer = "ik_smart")
   private String comment;
}
